package com.woniu.product.client;

import com.woniu.model.Result;
import com.woniu.product.client.model.VenueClassroom;
import com.woniu.product.client.model.VenueInfo;
import com.woniu.product.dto.classroomDto.ClassroomDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Set;

@FeignClient(value = "venue-server", path = "/venue")
public interface VenueClient {


    @ApiOperation("根据场馆id查询场馆信息")
    @GetMapping("/venueInfo/loadVenueInfoById/{id}")
    Result<VenueInfo> loadVenueInfoById(@PathVariable("id") Integer id);

    @ApiOperation("根据id查询教室")
    @GetMapping("/venueClassroom/loadVenueRoom/{id}")
    Result<VenueClassroom> loadVenueRoom(@PathVariable("id") Integer id);

    @ApiOperation("根据ids查询教室")
    @PostMapping("/venueClassroom/loadVenueRooms")
    Result<List<ClassroomDto>> loadVenueRooms(@RequestBody Set<Integer> ids);


}
